Skip to content

Conversation

atlj
Copy link
Collaborator

@atlj atlj commented Apr 4, 2025

Summary

  • Some people are having XCode build issues with new-architecture enabled libraries, fabric and turbo modules.
  • The issues are related to XCode not being able to resolve #import directives following this pattern generated/x/y.h
  • This PR changes the template so these headers are imported from the generated LLVM module using the module include paths such as: <ModuleName/header.h>
  • Also made all the headers private. Otherwise the modules fail when user tries to add a Swift file. This is because cocoapods automatically generates an umbrella header based on all the available headers and the swift compilation step treats all headers in the umbrella header as objective-c headers. This in turn results in an error since some headers need objective-cpp features and cpp stdlib headers.

Test plan

  1. Create a turbo module and a fabric view separately
  2. Make sure you're able to build the library on XCode 16.0, 16.1, and 16.2

@atlj atlj force-pushed the fix-header-import-issues branch from 6c3423b to ae8afea Compare April 4, 2025 18:55
Copy link
Member

@satya164 satya164 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@satya164 satya164 added this pull request to the merge queue Apr 4, 2025
Merged via the queue into main with commit 7c12d62 Apr 4, 2025
22 checks passed
@satya164 satya164 deleted the fix-header-import-issues branch April 4, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants